package com.codrim.cs.data.server.dao.entity;

import com.codrim.common.utils.enums.TrueFalse;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

/**
 * Created by Liang.Zhuge on 04/07/2017.
 */
@Document(collection = ClickDO.COLLECTION_NAME)
public class ClickDO implements Serializable {
    public static final String COLLECTION_NAME = "clicks";

    @Id
    private String id;
    private @JsonProperty("affid") String affId;
    private @JsonProperty("offerid") String offerId;
    private String callback;
    private String idfa;
    private String imei;
    private String andid;
    private String ts;
    private String token;
    private @JsonProperty("click_ip") String ip;
    private @JsonProperty("click_ua") String ua;
    private @JsonProperty("click_url") String clickUri;
    private @JsonProperty("click_cookies") String cookies;
    private @JsonProperty("click_date") String clickDate;
    private @JsonProperty("source_id") String sourceId;
    private String mac;
    private String os;
    private String osver;
    private String sub1;
    private String sub2;
    private String sub3;
    private String sub4;
    private String sub5;
    private @JsonProperty("dev_model") String devModel;
    private String cid;
    private String tid;
    private @JsonProperty("country_id") String countryId;
    private @JsonProperty("geo_status") int geoStatus;
    private @JsonProperty("offer_status") int offerStatus;
    private @JsonProperty("access_price") float accessPrice;
    private @JsonProperty("put_price") float putPrice;
    private @JsonProperty("currency_symbol") String currencySymbol;
    private @JsonProperty("advid") long advId;
    /**
     * 智能核减下的配置的核减百分比
     */
    private int scrub;
    private @JsonProperty("click_status") int clickStatus;
    private @JsonProperty("click_msg") String clickMsg;
    private @JsonProperty("offer_url") String offerUrl;
    private String postback;
    /**  是否为唯一点击 */
    private int uniqueClick;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAffId() {
        return affId;
    }

    public void setAffId(String affId) {
        this.affId = affId;
    }

    public String getOfferId() {
        return offerId;
    }

    public void setOfferId(String offerId) {
        this.offerId = offerId;
    }

    public String getCallback() {
        return callback;
    }

    public void setCallback(String callback) {
        this.callback = callback;
    }

    public String getIdfa() {
        return idfa;
    }

    public void setIdfa(String idfa) {
        this.idfa = idfa;
    }

    public String getImei() {
        return imei;
    }

    public void setImei(String imei) {
        this.imei = imei;
    }

    public String getAndid() {
        return andid;
    }

    public void setAndid(String andid) {
        this.andid = andid;
    }

    public String getTs() {
        return ts;
    }

    public void setTs(String ts) {
        this.ts = ts;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getUa() {
        return ua;
    }

    public void setUa(String ua) {
        this.ua = ua;
    }

    public String getClickUri() {
        return clickUri;
    }

    public void setClickUri(String clickUri) {
        this.clickUri = clickUri;
    }

    public String getCookies() {
        return cookies;
    }

    public void setCookies(String cookies) {
        this.cookies = cookies;
    }

    public String getClickDate() {
        return clickDate;
    }

    public void setClickDate(String clickDate) {
        this.clickDate = clickDate;
    }

    public String getSourceId() {
        return sourceId;
    }

    public void setSourceId(String sourceId) {
        this.sourceId = sourceId;
    }

    @JsonSetter("sourceid")
    public void setSourceid(String sourceId) {
        this.sourceId = sourceId;
    }

    @JsonGetter("sourceid")
    public String getSourceid() {
        return this.sourceId;
    }

    @JsonSetter("offerid")
    public void setOfferid(String offerId) {
        this.offerId = offerId;
    }

    @JsonSetter("affid")
    public void setAffid(String affid) {
        this.affId = affid;
    }

    public String getMac() {
        return mac;
    }

    public void setMac(String mac) {
        this.mac = mac;
    }

    public String getOs() {
        return os;
    }

    public void setOs(String os) {
        this.os = os;
    }

    public String getOsver() {
        return osver;
    }

    public void setOsver(String osver) {
        this.osver = osver;
    }

    public String getSub1() {
        return sub1;
    }

    public void setSub1(String sub1) {
        this.sub1 = sub1;
    }

    public String getSub2() {
        return sub2;
    }

    public void setSub2(String sub2) {
        this.sub2 = sub2;
    }

    public String getSub3() {
        return sub3;
    }

    public void setSub3(String sub3) {
        this.sub3 = sub3;
    }

    public String getSub4() {
        return sub4;
    }

    public void setSub4(String sub4) {
        this.sub4 = sub4;
    }

    public String getSub5() {
        return sub5;
    }

    public void setSub5(String sub5) {
        this.sub5 = sub5;
    }

    public String getDevModel() {
        return devModel;
    }

    public void setDevModel(String devModel) {
        this.devModel = devModel;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid;
        this.id = tid;
    }

    public String getCountryId() {
        return countryId;
    }

    public void setCountryId(String countryId) {
        this.countryId = countryId;
    }

    public int getGeoStatus() {
        return geoStatus;
    }

    public void setGeoStatus(int geoStatus) {
        this.geoStatus = geoStatus;
    }

    public int getOfferStatus() {
        return offerStatus;
    }

    public void setOfferStatus(int offerStatus) {
        this.offerStatus = offerStatus;
    }

    public float getAccessPrice() {
        return accessPrice;
    }

    public void setAccessPrice(float accessPrice) {
        this.accessPrice = accessPrice;
    }

    public float getPutPrice() {
        return putPrice;
    }

    public void setPutPrice(float putPrice) {
        this.putPrice = putPrice;
    }

    public String getCurrencySymbol() {
        return currencySymbol;
    }

    public void setCurrencySymbol(String currencySymbol) {
        this.currencySymbol = currencySymbol;
    }

    public long getAdvId() {
        return advId;
    }

    public void setAdvId(long advId) {
        this.advId = advId;
    }

    public int getScrub() {
        return scrub;
    }

    public void setScrub(int scrub) {
        this.scrub = scrub;
    }

    public int getClickStatus() {
        return clickStatus;
    }

    public void setClickStatus(int clickStatus) {
        this.clickStatus = clickStatus;
    }

    public String getClickMsg() {
        return clickMsg;
    }

    public void setClickMsg(String clickMsg) {
        this.clickMsg = clickMsg;
    }

    public String getOfferUrl() {
        return offerUrl;
    }

    public void setOfferUrl(String offerUrl) {
        this.offerUrl = offerUrl;
    }

    public String getPostback() {
        return postback;
    }

    public void setPostback(String postback) {
        this.postback = postback;
    }

    public int getUniqueClick() {
        return uniqueClick;
    }

    public void setUniqueClick(int uniqueClick) {
        this.uniqueClick = uniqueClick;
    }

    public void setUniqueClick(TrueFalse trueFalse) {
        this.uniqueClick = trueFalse.getKey();
    }
}
